package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.Dept;
import org.apache.ibatis.annotations.*;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;


@Mapper
public interface DeptMapper extends BaseMapper<Dept> {
/*
    //查询
    @Select("select * from dept  order by update_time desc ;")
    List<Dept> selectAll();
    //删除
    @Delete("delete from dept where id = #{id};")
    void deleteById(Integer id);
    //添加
    @Insert("insert into dept (name,create_time,update_time) values(#{name},#{createTime},#{updateTime})")
    void insertMapperDept(Dept dept);
    //根据id查询
    @Select("select * from dept where id = #{id};")
    Dept selectMapperById(Integer id);
    //根据id修改数据
    @Update("update dept set name = #{name},update_time=#{updateTime} where id = #{id};")
    void updateMapperById(Dept dept);
*/

}
